#include <QCoreApplication>
#include <iostream>
#include <cmath>
using namespace std;

int main(int argc, char *argv[])
{
    QCoreApplication w(argc, argv);
    double A=0;
    double R1=0;
    double R2=0;
    double S=0;
    int i;
    cout<<"Viberite element, 1-Storona, 2-R vpisanoi, 3-R opisanoi, 4-Ploshad': ";
    cin>>i;
    cout<<"Vvedite znachenie: ";
    switch (i)
    {
    case 1: cin>>A;cout<<"A= "<<A<<" R1= "<<A*sqrt(3/6)<<" R2= "<<2*A*sqrt(3/6)<<" S="<<(A*A)*sqrt(3/4);break;
    case 2: cin>>R1;cout<<"A= "<<R1/sqrt(3/6)<<" R1= "<<R1<<" R2= "<<2*R1<<" S="<<pow((R1/sqrt(3/6)),2)*sqrt(3/4);break;
    case 3: cin>>R2;cout<<"A= "<<R2/2/sqrt(3/6)<<" R1= "<<R2/2<<" R2= "<<R2<<" S="<<pow((R2/2/sqrt(3/6)),2)*sqrt(3/4);break;
    case 4: cin>>S;cout<<"A= "<<sqrt(S/sqrt(3/4))<<" R1= "<<sqrt(S/sqrt(3/4))*sqrt(3/6)<<" R2= "<<sqrt(S/sqrt(3/4))*sqrt(3/6)*2<<" S="<<S;break;
    }
    return w.exec();
}
